<%
Dim surveyName
surveyName = "" & Request.QueryString("surveyName")
Dim exportType
exportType = "" & Request.QueryString("type")
Response.Expires = -1

Dim objCATI
Set objCATI = Server.CreateObject("oxWebCATICom.CATIExport")
If exportType = "excel" Then
	objCATI.ExcelExport CStr(surveyName)
Else
	objCATI.TextExport CStr(surveyName)
End If

 Dim redirectionUrl
 redirectionUrl = "/WebCATI/surveyData/" & surveyName & "/" & surveyName & "_Export."
 If exportType = "excel" Then redirectionUrl = redirectionUrl & "xls" Else redirectionUrl = redirectionUrl & "txt"
 
 Response.Redirect redirectionUrl


%>